# -*- coding:utf-8 -*-
# title           :
# description     :
# author          :Python超人/三月三提供
# date            :2024-08-15
# link            :https://gitcode.net/pythoncr/
# python_version  :3.9
# ==============================================================================
from 神笔码靓.码靓库.头像.头像颜色定义 import 常见肤色
from 神笔码靓.神笔库.定义集 import *


class 女眼睛:
    眼睛01 = "眼睛01"
    眼睛02 = "眼睛02"
    眼睛03 = "眼睛03"
    眼睛04 = "眼睛04"
    眼睛05 = "眼睛05"
    眼睛06 = "眼睛06"


class 男眼睛:
    眼睛01 = "眼睛01"
    眼睛02 = "眼睛02"
    眼睛03 = "眼睛03"
    眼睛04 = "眼睛04"
    眼睛05 = "眼睛05"
    眼睛06 = "眼睛06"
    眼睛07 = "眼睛07"
    眼睛08 = "眼睛08"
    眼睛09 = "眼睛09"
    眼睛10 = "眼睛10"
    眼睛11 = "眼睛11"
    眼睛12 = "眼睛12"


class 女头发:
    头发01 = "头发01"
    头发02 = "头发02"
    头发03 = "头发03"
    头发04 = "头发04"
    头发05 = "头发05"
    头发06 = "头发06"
    头发07 = "头发07"
    头发08 = "头发08"
    头发09 = "头发09"
    头发10 = "头发10"
    头发11 = "头发11"
    头发12 = "头发12"
    头发13 = "头发13"
    头发14 = "头发14"
    头发15 = "头发15"
    头发16 = "头发16"
    头发17 = "头发17"
    头发18 = "头发18"
    头发19 = "头发19"
    头发20 = "头发20"
    头发21 = "头发21"
    头发22 = "头发22"
    头发23 = "头发23"
    头发24 = "头发24"
    头发25 = "头发25"
    头发26 = "头发26"
    头发27 = "头发27"
    头发28 = "头发28"
    头发29 = "头发29"
    头发30 = "头发30"
    头发31 = "头发31"
    头发32 = "头发32"
    头发33 = "头发33"
    头发34 = "头发34"
    头发35 = "头发35"
    头发36 = "头发36"
    头发37 = "头发37"
    头发38 = "头发38"


class 男头发:
    头发01 = "头发01"
    头发02 = "头发02"
    头发03 = "头发03"
    头发04 = "头发04"
    头发05 = "头发05"
    头发06 = "头发06"
    头发07 = "头发07"
    头发08 = "头发08"
    头发09 = "头发09"
    头发10 = "头发10"
    头发11 = "头发11"
    头发12 = "头发12"
    头发13 = "头发13"
    头发14 = "头发14"
    头发15 = "头发15"
    头发16 = "头发16"
    头发17 = "头发17"
    头发18 = "头发18"
    头发19 = "头发19"
    头发20 = "头发20"
    头发21 = "头发21"
    头发22 = "头发22"
    头发23 = "头发23"
    头发24 = "头发24"
    头发25 = "头发25"
    头发26 = "头发26"
    头发27 = "头发27"


class 女面部:
    面部01 = "面部01"
    面部02 = "面部02"


class 男面部:
    面部01 = "面部01"
    面部02 = "面部02"


class 女眉毛:
    眉毛01 = "眉毛01"
    眉毛02 = "眉毛02"


class 男眉毛:
    眉毛01 = "眉毛01"


class 女嘴巴:
    嘴巴01 = "嘴巴01"
    嘴巴02 = "嘴巴02"
    嘴巴03 = "嘴巴03"
    嘴巴04 = "嘴巴04"
    嘴巴05 = "嘴巴05"
    嘴巴06 = "嘴巴06"
    嘴巴07 = "嘴巴07"


class 男嘴巴:
    嘴巴01 = "嘴巴01"


class 女上身:
    上身01 = "上身01"
    上身02 = "上身02"
    上身03 = "上身03"
    上身04 = "上身04"
    上身05 = "上身05"
    上身06 = "上身06"
    上身07 = "上身07"
    上身08 = "上身08"
    上身09 = "上身09"
    上身10 = "上身10"
    上身11 = "上身11"
    上身12 = "上身12"


class 男上身:
    上身01 = "上身01"
    上身02 = "上身02"
    上身03 = "上身03"
    上身04 = "上身04"
    上身05 = "上身05"
    上身06 = "上身06"
    上身07 = "上身07"
    上身08 = "上身08"
    上身09 = "上身09"
    上身10 = "上身10"
    上身11 = "上身11"
    上身12 = "上身12"
    上身13 = "上身13"
    上身14 = "上身14"


class 女鼻子:
    鼻子01 = "鼻子01"
    鼻子02 = "鼻子02"


class 男鼻子:
    鼻子01 = "鼻子01"


class 男胡须:
    胡须01 = "胡须01"
    胡须02 = "胡须02"
    胡须03 = "胡须03"
    胡须04 = "胡须04"
    胡须05 = "胡须05"
    胡须06 = "胡须06"
    胡须07 = "胡须07"
    胡须08 = "胡须08"
    胡须09 = "胡须09"
    胡须10 = "胡须10"
    胡须11 = "胡须11"


class 耳朵:
    耳朵01 = "耳朵01"
    耳朵02 = "耳朵02"


class 眼镜:
    派对眼罩01 = "派对眼罩01"
    派对眼罩02 = "派对眼罩02"
    眼镜01 = "眼镜01"
    眼镜02 = "眼镜02"
    眼镜03 = "眼镜03"
    眼镜04 = "眼镜04"
    眼镜05 = "眼镜05"
    眼镜06 = "眼镜06"
    眼镜07 = "眼镜07"
    眼镜08 = "眼镜08"


@dataclass
class 头像部件微调:
    # 部件名: str = "眼睛"
    上下: float = 0  # 上负下正
    左右: float = 0  # 左负右正
    旋转: float = 0  # 顺正逆负
    缩放: [float, tuple[float, float]] = 1.0  # 缩小放大，1.0不变
    水平翻转: bool = 否
    垂直翻转: bool = 否


@dataclass
class 头像部件配置:
    性别: str = "女"
    肤色: str = 常见肤色.黄色
    面部: str = "面部01"
    眼睛: str = "眼睛01"
    鼻子: str = "鼻子01"
    胡须: [str, None] = None
    胡须颜色: str = 颜色.黑色
    耳朵: str = "耳朵01"
    头发: str = "头发01"
    头发颜色: str = 颜色.黑色
    眉毛: str = "眉毛01"
    眉毛颜色: str = 颜色.黑色
    嘴巴: str = "嘴巴01"
    上身: str = "上身01"
    眼镜: [str, None] = None
    帽子: [str, None] = None
    眼镜在头发前: bool = 否
    显示边框: bool = 否
    _面部微调: [头像部件微调, None] = None
    _眼睛微调: [头像部件微调, None] = None
    _鼻子微调: [头像部件微调, None] = None
    _胡须微调: [头像部件微调, None] = None
    _耳朵微调: [头像部件微调, None] = None
    _头发微调: [头像部件微调, None] = None
    _眉毛微调: [头像部件微调, None] = None
    _嘴巴微调: [头像部件微调, None] = None
    _上身微调: [头像部件微调, None] = None
    _眼镜微调: [头像部件微调, None] = None
    _帽子微调: [头像部件微调, None] = None

    def 微调帽子(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._帽子微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 帽子微调(self):
        return self._帽子微调

    def 微调面部(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._面部微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 面部微调(self):
        return self._面部微调

    def 微调眼睛(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._眼睛微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 眼睛微调(self):
        return self._眼睛微调

    def 微调鼻子(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._鼻子微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 鼻子微调(self):
        return self._鼻子微调

    def 微调胡须(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._胡须微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 胡须微调(self):
        return self._胡须微调

    def 微调耳朵(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._耳朵微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 耳朵微调(self):
        return self._耳朵微调

    def 微调头发(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._头发微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 头发微调(self):
        return self._头发微调

    def 微调眉毛(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._眉毛微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 眉毛微调(self):
        return self._眉毛微调

    def 微调嘴巴(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._嘴巴微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 嘴巴微调(self):
        return self._嘴巴微调

    def 微调上身(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._上身微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 上身微调(self):
        return self._上身微调

    def 微调眼镜(self, 上下=0, 左右=0, 旋转=0, 缩放: [float, tuple[float, float]] = 1, 水平翻转: bool = 否, 垂直翻转: bool = 否):
        self._眼镜微调 = 头像部件微调(上下=上下, 左右=左右, 旋转=旋转, 缩放=缩放, 水平翻转=水平翻转, 垂直翻转=垂直翻转)

    @property
    def 眼镜微调(self):
        return self._眼镜微调


if __name__ == '__main__':
    部件配置 = 头像部件配置(性别="男", 面部="面部01", 眼睛="眼睛01", 鼻子="鼻子01", 胡须=None, 胡须颜色=颜色.黑色, 耳朵="耳朵01",
                  头发="头发01", 头发颜色=颜色.黑色, 眉毛="眉毛01", 眉毛颜色=颜色.黑色, 嘴巴="嘴巴01", 上身="上身01", 眼镜=None)
    部件微调 = 头像部件微调(上下=0, 左右=0, 旋转=0, 缩放=1.0)
    部件配置.微调面部(0, 1, 2, 3)
    print(部件配置.面部微调)

